﻿<?php

namespace html;

use Classes\autoload\SplClassLoader;
use Classes\Relation;
use PDO;

class Follow {
	public static function showFollowings($user_id) {
		$followings = Relation::getFollowings ( $user_id );
		
		echo '<p>Потребители, които следвате</p>';
		
		foreach ( $followings as $following ) {
			echo '<p><a href="?profile=' . $following ['user_id'] . '">' . $following ['user_name'] . '</a></p>';
			echo '<a href="?relation=end&user=' . $following ['user_id'] . '">Спри да следваш</a>';
		}
	}
	public static function showFollowers($user_id) {
		$followers = Relation::getFollowers ( $user_id );
		
		echo '<p>Потребители, които ви следят</p>';
		
		foreach ( $followers as $follower ) {
			echo '<p><a href="?profile=' . $follower ['user_id'] . '">' . $follower ['user_name'] .'</a></p>';
		}
	
	}
}